package com.ktgj.customer.mapper;

import java.util.List;
import com.ktgj.customer.domain.GuaranteeCase;
import com.ktgj.customer.domain.vo.CaseMIne;
import com.ktgj.customer.domain.vo.GuaranteeCaseVO;
import com.ktgj.customer.domain.vo.TemporaryGuaranteeCase;
import com.ktgj.customer.domain.vo.TmpCaseMIneVo;
import org.apache.ibatis.annotations.Param;

/**
 * 工单Mapper接口
 * 
 * @author ruoyi
 * @date 2022-03-15
 */
public interface GuaranteeCaseMapper 
{
    /**
     * 查询工单
     * 
     * @param caseId 工单ID
     * @return 工单
     */
    public GuaranteeCase selectGuaranteeCaseById(Long caseId);

    //查找理赔工单通用信息
    public GuaranteeCase selectCaseClaimIdById(Long caseId);
    //查找投诉工单通用信息
    public GuaranteeCase selectCaseComplaintById(Long caseId);
    //查找渎失职工单通用信息
    public GuaranteeCase selectCaseMalfeasanceById(Long caseId);

    /**
     * 查询工单列表
     * 
     * @param guaranteeCase 工单
     * @return 工单集合
     */
    public List<GuaranteeCase> selectGuaranteeCaseList(GuaranteeCase guaranteeCase);

    /**
     * 新增工单
     * 
     * @param guaranteeCase 工单
     * @return 结果
     */
    public int insertGuaranteeCase(GuaranteeCase guaranteeCase);

    /**
     * 修改工单
     * 
     * @param guaranteeCase 工单
     * @return 结果
     */
    public int updateGuaranteeCase(GuaranteeCase guaranteeCase);

    /**
     * 删除工单
     * 
     * @param caseId 工单ID
     * @return 结果
     */
    public int deleteGuaranteeCaseById(Long caseId);

    /**
     * 批量删除工单
     * 
     * @param caseIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteGuaranteeCaseByIds(Long[] caseIds);

    /**
     * 查询工单
     *
     * @param caseId 工单ID
     * @param caseStatus 状态
     * @param afterTime 之后
     * @param agoTime 之前
     * @param orderId 订单号
     * @param orderType 订单类型
     * @return 工单
     */
    public List<GuaranteeCase> selectGuaranteeCase(@Param("caseId") Long caseId, @Param("caseStatus") Long caseStatus,
                                             @Param("afterTime") String afterTime, @Param("agoTime") String agoTime,
                                             @Param("orderId") Long orderId, @Param("orderType") String orderType);

    /**
     * 后端——查询工单
     * */
    public List<GuaranteeCase> backSelectGuaranteeCase(Long customerId);

    /**
     * 后端——条件查询工单
     * */
    public List<GuaranteeCase> backSelectGuaranteeCaseById(GuaranteeCaseVO guaranteeCase);

    /**
     * 后端——创建工单
     * */
    public int backInsertGuaranteeCase(GuaranteeCase guaranteeCase);

    /**
     * 后端——查询工单详细
     * */
    public GuaranteeCase backGuaranteeCaseById(Long caseId);

    /**
     *工单类列表
     */
    public List<GuaranteeCase> selectworkOrderType(Long deptId);

    /**
     * 订单号查工单id
     * */
    public GuaranteeCase selectGuaranteeCaseByOrderId(Long orderId);

    /**
     * 我的任务工单查询
     * @param caseMIne
     * @return
     */
    public List<TmpCaseMIneVo> selectCaseMine(CaseMIne caseMIne);

    /**
     * id获取所有类型工单
     * */
    public GuaranteeCase guaranteeCase(Long id);
}
